<?php
namespace FrontEnd\Controller;

use Zend\Mvc\Controller\AbstractActionController;

class HeadController extends AbstractActionController
{
	
	public function headsAction($title=null){
		$renderer = $this->getServiceLocator()->get('Zend\View\Renderer\PhpRenderer');
		$getjquest  = $this->getEvent()->getRouteMatch()->getParams();
		$resource = $getjquest['controller'] . '-' . $getjquest['action'];
		
		switch ($resource) {
			case 'FrontEnd\Controller\Index-index':
				$renderer->headTitle('Tin tức - Giải trí');
				$renderer->headMeta()->appendName('keywords', 'Cập nhật video , truyện tranh ,thông tin,giải trí,văn hóa hài hước');
				$renderer->headMeta()->appendName('description', 'Cập nhật video , truyện tranh ,thông tin,giải trí,văn hóa hài hước');
				$renderer->headLink()->appendStylesheet('/public/template/frontend/css/frontend.min.css');
				$renderer->headScript()->appendFile('/public/template/frontend/js/frontend-index.js');
				break;
			case 'FrontEnd\Controller\Index-video':
				$renderer->headTitle($title);
				$renderer->headLink()->appendStylesheet('/public/template/frontend/css/frontend.min.css');
				$renderer->headScript()->appendFile('/public/template/frontend/js/frontend-index.js');
				$renderer->headLink()->appendStylesheet('/public/template/plugin/video-js/video-js.min.css');
				$renderer->headScript()->appendFile('/public/template/plugin/video-js/video.js');
				$renderer->headScript()->appendFile('/public/template/plugin/video-js/youtube.js');
				break;
			case 'FrontEnd\Controller\Index-type':
				$renderer->headTitle($title);
				$renderer->headLink()->appendStylesheet('/public/template/frontend/css/frontend.min.css');
				$renderer->headScript()->appendFile('/public/template/frontend/js/frontend-index.js');
				break;
			default:
				return ;
				break;
		}
	}
}